import APIS from '../api';
import httpRequest from '../httpRequest';

// 返回的数据类型
type RESULT = {
  refresh: string;
  access: string;
};

// 登录
export const login = (data: { username: string; password: string }) => {
  return httpRequest.post<RESULT>({ url: APIS.token, data });
};
